file <- commandArgs(TRUE)[1]

r <- read.table(file)

v1 <- data.frame(cbind(count=1:10))
v1$value <- r$V1
v1$mean <- rep(mean(v1$value), 10)
error <- qt(0.975,df=length(v1$value)-1)*sd(v1$value)/sqrt(length(v1$value))
v1$upper <- v1$mean+error
v1$lower <- v1$mean-error

png("best.png", width = 576, height=345)

plot(v1$count, v1$value, ylim=c(17000,18000), col="blue", cex=1.4, xlab="Rodada", ylab="Acertos", axes=FALSE)
axis(2, at = c(17000, 17629, 18000), las=1)
axis(1, at = 1:10)
lines(v1$count, v1$mean, type="l", lty=1)
lines(v1$count, v1$upper, type="l", lty=2)
lines(v1$count, v1$lower, type="l", lty=2)
legend("bottomright", legend = c( "Acertos","Média dos acertos", "Intervalo de confiança"), pch=c(1,-1,-1), lty=c(-1,1,2), col=c("blue",1,1))


